With the fast popularity of IP networks, Voice over IP (VoIP) is widely used and the POS over VoIP is widely deployed. Accompanying this is a new style of consumption through card swiping on a POS connected to a Plain Old Telephone Service (POTS) port of a home gateway. The new style of payment is now accepted almost everywhere by households, shopping malls, hospitals, and other organizations. Payment through POS requires a prompt and reliable connection with a remote banking center. To enable a POS application over an IP network, a Digital Signal Processor (DSP) of a gateway must be used to detect the answer tone sent by the remote end through Real-time Transport Protocol (RTP) packets, and then the DSP is switched from the normal voice service mode to the POS data service mode.
During the implementation of the present invention, the inventor finds that the prior art has at least the following problems.
First, delays are unavoidable in an IP network. A delay exists when the gateway receives the answer tone carried in RTP packets form the remote end, as a result, a delay also exists when the DSP is switched to the POS data service mode upon detection of the answer tone. Therefore, a prompt connection between the POS and the remote banking center cannot be assured and fast payment through card swiping is impossible.
Second, because packet loss and jitter are unavoidable in an IP network, an error may occur when the DSP detects the answer tone from the remote end, and even worse, the DSP may fail to switch to the POS data service mode. As a result, a connection cannot be set up between the POS and the remote banking center and consequently, the payment through card swiping is unsuccessful.